﻿<UserControl x:Class="Activities.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:local="clr-namespace:Activities"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="400" Height="300">
    <UserControl.Resources>
        <local:MyCreateActivityRequest x:Key="CreateActivityRequest" Adjective="Cool" 
            TemplateName="Template_1" Priority="opensocial.CreateActivityPriority.HIGH">
            <local:MyCreateActivityRequest.MediaItems>
                <sys:String>http://api.myspace.com/v1/users/228722276</sys:String>
            </local:MyCreateActivityRequest.MediaItems>
        </local:MyCreateActivityRequest>

    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="Azure">
        <StackPanel Orientation="Horizontal" VerticalAlignment="Top">
            <TextBlock Text="Adjective: "/>
            <TextBox 
                Text="{Binding Adjective, Source={StaticResource CreateActivityRequest}, Mode=TwoWay}" 
                MinWidth="100"/>
            <Button Content="Create Activity" Click="OnCreateActivity"/>
        </StackPanel>
    </Grid>
</UserControl>
